 /**
  * @Des: ase 加密解密  后续加入base64 进行处理
  * @Author: willing
  */
import { AES, mode, pad, enc } from 'crypto-ts'
export default class VAES {
 
  static encrypt(text: string | null, aseKey: string): string | null {
    return AES.encrypt(text ?? '', aseKey, { mode: mode.ECB, padding: pad.PKCS7 }).toString()
  }

  static decrypt(text: string | null, aseKey: string): string | null {
    return AES.decrypt(text ?? '', aseKey, { mode: mode.ECB, padding: pad.PKCS7 }).toString(enc.Utf8)
  }
}
